package com.ihai.spring.boot.sample;

import com.ihai.spring.boot.sample.interceptor.ResponseInterceptor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;

/**
 * DESC
 *
 * @author Adolphus
 * @date 2018/10/18
 */
@SpringBootApplication
public class InterceptorApplication {
    public static void main(String[] args) {
        SpringApplication.run(InterceptorApplication.class, args);
    }

    @Bean
    public HandlerInterceptor handlerInterceptor() {
        return new ResponseInterceptor();
    }
}
